import { createRouter, createWebHistory } from 'vue-router'
const home = () => import('@/views/home.vue')
const javascript = () => import('@/views/js/javascript.vue')
const jsextral = () => import('@/views/js/jsextral.vue')
const debounce = () => import('@/views/vue/vue-gongneng/debounce.vue')
const throttle = () => import('@/views/vue/vue-gongneng/throttle.vue')
const vueknowledge = () => import('@/views/vue/vue-zhishi/vueknowledge.vue')
const jszhishi = () => import('@/views/practice/js/jszhishi.vue')

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: home,
    },
    {
      path: '/javascript',
      name: 'javascript',

      component: javascript,
    },

    {
      path: '/jsextral',
      name: 'jsextral',

      component: jsextral,
    },

    {
      path: '/debounce',
      name: 'debounce',

      component: debounce,
    },

    {
      path: '/throttle',
      name: 'throttle',

      component: throttle,
    },

    {
      path: '/vueknowledge',
      name: 'vueknowledge',

      component: vueknowledge,
    },
    {
      path: '/jszhishi',
      name: 'jszhishi',

      component: jszhishi,
    },
  ],
})

export default router
